package cn.xiaobai.captcha.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author yangdaji
 * @version 1.0
 * @Description: 数据映射bean
 * @date 22-3-20 下午 10:03
 */
@Data
@Accessors(chain = true)
@Table("captcha_cache")
public class CaptchaBean implements Serializable {

    /**
     * 主键
     */
    @Id
    private Integer id;

    /**
     * 缓存key
     */
    private String key_name;

    /**
     * 缓存value
     */
    private String value;

    /**
     * 入库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loadTime;

    /**
     * 缓存时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cacheTime;
}
